<template>
  <div class="app-container">
    <el-dialog :close-on-click-modal="false" title="更多查询" :visible.sync="moreFilter" width="850px" append-to-body>
      <el-form :model="queryParams" ref="moreFilterForm" size="small" :inline="true" label-width="120px">
        <el-form-item label="发货单号" prop="relateBill1">
          <el-input v-model="queryParams.relateBill1" clearable placeholder="请输入发货单号"
                    @keyup.enter.native="handleQuery"/>
        </el-form-item>
        <el-form-item label="出发运点" prop="fromServerZoneIdDtLabel">
          <el-input v-model="queryParams.fromServerZoneIdDtLabel" placeholder="请填写出发运点" clearable/>
        </el-form-item>
        <el-form-item label="目的运点" prop="toServerZoneIdDtLabel">
          <el-input v-model="queryParams.toServerZoneIdDtLabel" clearable placeholder="请填写目的运点"/>
        </el-form-item>
        <el-form-item label="合同是否超期" prop="customerIsExceed">
          <el-select v-model="queryParams.customerIsExceed" placeholder="请选择是否回单" clearable
                     @keyup.enter.native="handleQuery">
            <el-option v-for="dict in dict.type.CommIsNot" :key="dict.value" :label="dict.label"
                       :value="dict.value"/>
          </el-select>
        </el-form-item>
        <el-form-item label="实际到达时间">
          <el-date-picker v-model="queryParams.daterangeFactArriveTime" style="width: 240px" value-format="yyyy-MM-dd"
                          type="daterange"
                          range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
        </el-form-item>
        <el-form-item label="实际发运时间">
          <el-date-picker v-model="queryParams.daterangeFactLeaveTime" style="width: 240px" value-format="yyyy-MM-dd"
                          type="daterange"
                          range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
        </el-form-item>
        <el-form-item label="要求到达时间" prop="planArriveTime">
          <el-date-picker clearable v-model="queryParams.planArriveTime" type="date" value-format="yyyy-MM-dd"
                          placeholder="请选择要求到达时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="要求发运时间" prop="planLeaveTime">
          <el-date-picker v-model="queryParams.daterangePlanLeaveTime" style="width: 240px" value-format="yyyy-MM-dd"
                          type="daterange"
                          range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
        </el-form-item>
        <el-form-item label="签收时间">
          <el-date-picker v-model="queryParams.daterangeQsTime" style="width: 240px" value-format="yyyy-MM-dd"
                          type="daterange"
                          range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
        </el-form-item>
        <el-form-item label="是否回单" prop="isBack">
          <el-select filterable v-model="queryParams.isBack" placeholder="请选择是否回单" clearable
                     @keyup.enter.native="handleQuery">
            <el-option v-for="dict in dict.type.CommIsNot" :key="dict.value" :label="dict.label"
                       :value="dict.value"/>
          </el-select>
        </el-form-item>
        <div slot="footer" class="dialog-footer">
          <el-button type="primary" @click="handleQuery">确 定</el-button>
          <el-button @click="moreFilter = false">取 消</el-button>
        </div>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="handleQuery">确 定</el-button>
        <el-button @click="moreFilter = false">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
export default {
  name: "LedMoreQuery",
  dicts: ['OrderStatus', 'CommIsNot', 'TransportPro', 'HandoverType', 'DB_JC_ORG'],
  props: {
    queryParams: {
      type: Object
    }
  },
  data() {
    return {
      moreFilter: false,
    }
  },
  methods: {
    // 取消按钮
    moreFilterQuery() {
      this.moreFilter = true
    },
    resetQuery() {
      this.daterangePlanLeaveTime = [];
      this.daterangeCreateTime = [];
      this.daterangeModifyTime = [];
      this.daterangeFactArriveTime = [];
      this.daterangeFactLeaveTime = [];
      this.daterangeTime = [];
      this.daterangeQsTime = [];
      this.resetForm("moreFilterForm");
    },
    /** 提交按钮 */
    handleQuery() {
      this.moreFilter = false
      this.$emit("ok")
    }
  }
};
</script>
<style lang="scss" scoped>
.el-form-item--small.el-form-item {
  width: 362px;
}
</style>
